// importM
import 'package:flutter/material.dart';

// ignore: unused_import
import './MyIcon.dart';
import './pages/tabswer.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Flutter Demo",
      theme: ThemeData(primarySwatch: Colors.deepPurple),
      home: TabsWer(),
    );
  }
}

// 动态加减
class HomePageFul extends StatefulWidget {
  const HomePageFul({super.key});

  @override
  State<HomePageFul> createState() => _HomePageFulState();
}

class _HomePageFulState extends State<HomePageFul> {
  int count = 0;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Flutter App", style: TextStyle(color: Colors.white)),
        backgroundColor: Colors.deepPurple,
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text("Welcome To My FlutterDemo", style: TextStyle(fontSize: 20)),
            Text("$count", style: TextStyle(fontSize: 80)),
            SizedBox(height: 50),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: () {
          setState(() {
            count++;
          });
        },
        child: Icon(Icons.add),
      ),
    );
  }
}